package com.scs.application.modules.sys.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "流程按钮表")
@TableName("sys_flow_button")
public class FlowButton extends SimpleDataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "流程ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String flowId;

    @EntityFieldAnnotation(
            text = "按钮KEY",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String code;

    @EntityFieldAnnotation(
            text = "按钮标题",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String title;

    @EntityFieldAnnotation(
            text = "类型",
            length = "10",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String type;

    @EntityFieldAnnotation(
            text = "节点值",
            length = "20",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String valueTo;

    @EntityFieldAnnotation(
            text = "显示条件",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String valueIf;

    @EntityFieldAnnotation(
            text = "图标",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String icon;


    @EntityFieldAnnotation(
            text = "流程开始操作标志",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Boolean flagStart;

    @EntityFieldAnnotation(
            text = "排序",
            length = "",
            default_value = "0",
            not_null = true,
            comment = "排序"
    )
    private Integer sort;

    @EntityFieldAnnotation(
            text = "流程结束操作标志",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Boolean flagEnd;

    @EntityFieldAnnotation(
            text = "需要审批意见",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Boolean flagComment;

    @EntityFieldAnnotation(
            type = EntityFieldType.JSON,
            text = "角色数组",
            length = "",
            default_value = "",
            not_null = false,
            comment = "角色数组"
    )
    private JSONArray roleCodes;

    @EntityFieldAnnotation(
            type = EntityFieldType.JSON,
            text = "用户数组",
            length = "",
            default_value = "",
            not_null = false,
            comment = "用户数组"
    )
    private JSONArray userCodes;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "批量操作",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagBatch;


    @EntityFieldAnnotation(
            text = "显示状态描述",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "显示状态描述"
    )
    private String valueIfTitle;

    @EntityFieldAnnotation(
            text = "流程作废",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagClose;


    @EntityFieldAnnotation(
            text = "需要确认",
            length = "100",
            not_null = false,
            default_value = "0",
            comment = "需要确认"
    )
    private Boolean flagConfirm;

    @EntityFieldAnnotation(
            text = "确认提示",
            not_null = false,
            comment = ""
    )
    private String confirmMsg;

    @EntityFieldAnnotation(
            text = "批量操作2",
            not_null = false,
            default_value = "0",
            comment = "选中后，将调用flow_change_batch方法"
    )
    private Boolean flagBatch2;

    @EntityFieldAnnotation(
            text = "提交前保存",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagSave;
}
